﻿package plugin.shop.component
{
    import cmd.*;
    import com.core.*;
    import com.sh.game.util.*;
    import flash.display.*;
    import flash.events.*;
    import flash.geom.*;
    import flash.ui.*;
    import manager.*;
    import morn.core.components.*;

    public class NewXlPage extends Sprite
    {
        private var btn1:Button;
        private var btn2:Button;
        private var btn3:Button;

        public function NewXlPage()
        {
            this.init();
            return;
        }// end function

        private function init() : void
        {
            this.btn1 = new Button();
            this.btn1.skin = "png.common.btn_new";
            this.btn1.x = 124;
            this.btn1.y = 97;
            this.btn1.label = "单件装备修理";
            this.btn1.labelColors = "0xc8a890, 0xf6dfa8, 0x574039";
            this.btn1.labelStroke = "1";
            this.btn1.addEventListener(MouseEvent.CLICK, this.onClicked1);
            this.addChild(this.btn1);
            this.btn2 = new Button();
            this.btn2.skin = "png.common.btn_new";
            this.btn2.x = 124;
            this.btn2.y = 97 + 54;
            this.btn2.label = "装备修理";
            this.btn2.labelColors = "0xc8a890, 0xf6dfa8, 0x574039";
            this.btn2.labelStroke = "1";
            this.btn2.addEventListener(MouseEvent.CLICK, this.onClicked2);
            this.addChild(this.btn2);
            this.btn3 = new Button();
            this.btn3.skin = "png.common.btn_new";
            this.btn3.x = 124;
            this.btn3.y = 97 + 54 + 54;
            this.btn3.label = "全部装备修理";
            this.btn3.labelColors = "0xc8a890, 0xf6dfa8, 0x574039";
            this.btn3.labelStroke = "1";
            this.btn3.addEventListener(MouseEvent.CLICK, this.onClicked3);
            this.addChild(this.btn3);
            return;
        }// end function

        private function onClicked1(event:MouseEvent) : void
        {
            var _loc_2:Point = null;
            if (Mouse.cursor != "xiu")
            {
                _loc_2 = UIGlobel.pointsDic["bag"];
                ModelProxy.change("plugin", "open", {target:"bag", point:_loc_2});
                _loc_2 = UIGlobel.pointsDic["role"];
                ModelProxy.change("plugin", "open", {target:"role", point:_loc_2});
                Mouse.cursor = "xiu";
            }
            else
            {
                Mouse.cursor = MouseCursor.AUTO;
            }
            return;
        }// end function

        private function onClicked2(event:MouseEvent) : void
        {
            PluginManager.instance.sendToServer("shop", CMDShop.XiuAll, 0);
            return;
        }// end function

        private function onClicked3(event:MouseEvent) : void
        {
            PluginManager.instance.sendToServer("shop", CMDShop.XiuAll, 0);
            return;
        }// end function

    }
}
